package com.briup.jd2511.jd2511_product_source.service;

import com.briup.jd2511.jd2511_product_source.exception.ServiceException;
import com.briup.jd2511.jd2511_product_source.pojo.ManagerFenceHouse;
import com.briup.jd2511.jd2511_product_source.pojo.ext.ManagerFenceHouseExt;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface FenceHouseService {

    /**
     * 查询所有栏舍，带分页，带名称的条件
     * @param fhName 栏舍名称
     * @param pageNum 当前页码
     * @param pageSize 每页条数
     * @return com.github.pagehelper.PageInfo
     * @throws ServiceException
     */
    PageInfo<ManagerFenceHouse> getAllByFhNameByPage(String fhName, Integer pageNum, Integer pageSize) throws ServiceException;

    /**
     * 查询全部
     * @return java.util.List<ManagerFenceHouse>
     */
    List<ManagerFenceHouse> getAll();

    /**
     * 根据栏舍id查询栏舍详情，携带栏圈信息
     * @param fhId 栏舍id
     * @return com.briup.jd2511.jd2511_product_source.pojo.ext.ManagerFenceHouseExt
     * @throws ServiceException
     */
    ManagerFenceHouseExt getDetailByFhId(String fhId) throws ServiceException;

    /**
     * 新增/修改栏舍信息
     * @param managerFenceHouse com.briup.jd2511.jd2511_product_source.pojo.ManagerFenceHouse
     * @throws ServiceException
     */
    void saveOrUpdate(ManagerFenceHouse managerFenceHouse) throws ServiceException;

    /**
     * 根据id删除指定栏舍
     * @param id 栏舍id
     * @throws ServiceException
     */
    void removeById(String id) throws ServiceException;

    /**
     * 批量删除栏舍
     * @param ids 栏舍id列表
     * @throws ServiceException
     */
    void removeByIdAll(List<String> ids) throws ServiceException;
}
